<template>
    <div>
        <ul class="mui-table-view">
				<li class="mui-table-view-cell mui-media" v-for="items in newslists" :key="items.id">
					<router-link :to='"/home/newsInfo/"+items.id'>
						<img class="mui-media-object mui-pull-left"  :src="items.img_url">
						<div class="mui-media-body">
							{{items.title}}
							<p class='mui-ellipsis'>
                                <span>{{items.add_time}}</span>
                                <span>点击量：{{items.click}}次</span>
                            </p>
						</div>
					</router-link>
				</li>
        </ul>
    </div>
</template>
<script>
export default {
    data() {
        return {
            newslists:[]
        }
    },
    created(){
        this.getNewsList();
    },
    methods:{
        getNewsList(){
            this.$http.get("api/getnewslist").then(result=>{
                if(result.body.status  == 0){
                    this.newslists = result.body.message
                }
            })
        }
    }
}
</script>
<style lang="scss" scoped>
     .mui-ellipsis{
         display: flex;
         justify-content: space-between;
         align-items: center;
         font-size: 12px;
         color: aquamarine;
     }
</style>